/**
 * Created by Administrator on 2017/4/16 0016.
 */
var mvc = {};
mvc.model = {};


mvc.model.getCategories = function (data, fnSuccess, fnError) {
    $.ajax(
        {
            url: "/selectCategoriesList",
            type: "POST",
            data: data,
            success: fnSuccess,
            error: fnError
        }
    );
};
mvc.model.getAbout = function (data, fnSuccess, fnError) {
    $.ajax(
        {
            url: "/getAbout",
            type: "POST",
            data: data,
            success: fnSuccess,
            error: fnError
        }
    );
};
mvc.model.getImage = function (data, fnSuccess, fnError) {
    $.ajax(
        {
            url: "/searchCategories",
            type: "POST",
            data: data,
            success: fnSuccess,
            error: fnError
        }
    );
};
mvc.model.getArticleList = function (data, fnSuccess, fnError) {
    $.ajax(
        {
            url: "/selectArticleList",
            type: "POST",
            data: data,
            success: fnSuccess,
            error: fnError
        }
    );
};
mvc.model.getAboutMe = function (data, fnSuccess, fnError) {
    $.ajax(
        {
            url: "/getAbout",
            type: "POST",
            data: data,
            success: fnSuccess,
            error: fnError
        }
    );
};
mvc.model.getArticle = function (data, fnSuccess, fnError) {
    $.ajax(
        {
            url: "/searchArticle",
            type: "POST",
            data: data,
            success: fnSuccess,
            error: fnError
        }
    );
};
mvc.model.login = function (data, fnSuccess, fnError) {
    $.ajax(
        {
            url: "/login",
            type: "POST",
            data: data,
            success: fnSuccess,
            error: fnError
        }
    );
};
mvc.model.getArticleList03 = function (data, fnSuccess, fnError) {
    $.ajax(
        {
            url: "/selectArticleList",
            type: "POST",
            data: data,
            success: fnSuccess,
            error: fnError
        }
    );
};
mvc.model.deleteCategories = function (data, fnSuccess, fnError) {
    $.ajax(
        {
            url: "/deleteCategories",
            type: "POST",
            data: data,
            success: fnSuccess,
            error: fnError
        }
    );
};
mvc.model.addCategories = function (data, fnSuccess, fnError) {
    $.ajax(
        {
            url: "/addCategories",
            type: "POST",
            data: data,
            success: fnSuccess,
            error: fnError
        }
    );
};
mvc.model.getCategoriesInfo = function (data, fnSuccess, fnError) {
    $.ajax(
        {
            url: "/searchCategories",
            type: "POST",
            data: data,
            success: fnSuccess,
            error: fnError
        }
    );
};
mvc.model.deleteArticle = function (data, fnSuccess, fnError) {
    $.ajax(
        {
            url: "/deleteArticle",
            type: "POST",
            data: data,
            success: fnSuccess,
            error: fnError
        }
    );
};
mvc.model.updateArticleInfo = function (data, fnSuccess, fnError) {
    $.ajax(
        {
            url: "/updateArticle",
            type: "POST",
            dataType:'json',
            data: data,
            success: fnSuccess,
            error: fnError
        }
    );
};
mvc.model.updateCategories = function (data, fnSuccess, fnError) {
    $.ajax(
        {
            url: "/updateCategories",
            type: "POST",
            data: data,
            success: fnSuccess,
            error: fnError
        }
    );
};
mvc.model.addArticleInfo = function (data, fnSuccess, fnError) {
    $.ajax(
        {
            url: "/addArticle",
            type: "POST",
            dataType:'json',
            data: data,
            success: fnSuccess,
            error: fnError
        }
    );
};
mvc.model.getAbout01 = function (data, fnSuccess, fnError) {
    $.ajax(
        {
            url: "/getAbout",
            type: "POST",
            data: data,
            success: fnSuccess,
            error: fnError
        }
    );
};
mvc.model.updateAbout01 = function (data, fnSuccess, fnError) {
    $.ajax(
        {
            url: "/updateAbout",
            type: "POST",
            dataType:'json',
            data: data,
            success: fnSuccess,
            error: fnError
        }
    );
};
mvc.model.sendRegisterEmail = function (data,fnSuccess,fnError) {
    $.ajax({
        url:"/sendRegisterEmail",
        type:"POST",
        dataType:"json",
        data:data,
        success:fnSuccess,
        error:fnError

    });
};
mvc.model.register = function (data,fnSuccess,fnError) {
    $.ajax({
        url:"/register",
        type:"POST",
        dataType:"json",
        data:data,
        success:fnSuccess,
        error:fnError

    });
};
mvc.model.userLogin = function (data,fnSuccess,fnError) {
    $.ajax({
        url:"/userLogin",
        type:"POST",
        dataType:"json",
        data:data,
        success:fnSuccess,
        error:fnError

    });
};